package com.heima.cloud.clients;


import com.heima.cloud.clients.fallback.UserFeignApiFallBack;
import com.heima.cloud.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@FeignClient("user-service")
@Primary
@FeignClient(value= "user-service",fallback = UserFeignApiFallBack.class)
public interface UserFeignApi {

    @GetMapping("user/{id}")
    public User queryById(@PathVariable("id") String username);

}
